
<!-- 引入基类模板 -->
{extend name='public/base' /}

<!-- 主体部分 -->
{block name='content'}

<style>
.layui-tab-title .layui-this:after {
	 border-top: 3px solid #009688;
 }
.layui-form-item {
	margin-bottom: 10px;
	clear: both;
	*zoom: 1;
}
.layui-form-label {
	float: left;
	display: block;
	padding: 9px 15px;
	width: 120px;
	font-weight: 400;
	line-height: 20px;
	text-align: right;
}
</style>
<div class="layui-tab">
  	{if $config_group_list}
	<ul class="layui-tab-title">
		{foreach name="$config_group_list" item="val"}
		<li {if $val.id eq $group_id}class="layui-this"{/if}><a href="{:url('group', ['group_id'=>$val.id])}">{$val.name}</a></li>
		{/foreach}
	</ul>
	{/if}
	<div class="layui-tab-content">
		<form class="layui-form info-form" action="" style="width:80%;">
			<input name="group_id" type="hidden" value="{$group_id|default=0}">
			{if $list}
			{foreach name="$list" item="vo"}
				{if $vo.type eq 'hidden'}
					<!-- 隐藏域 -->
					<input name="{$vo.name}" id="{$vo.name}" type="hidden" value="{$vo.value|default=''}">
				{else}
					<div class="layui-form-item">
						<label class="layui-form-label">{$vo.title}：</label>
						{if $vo.type eq 'text'}
						<!-- 单行文本 -->
						<div class="layui-input-inline">
							<input name="{$vo.name}" value="{$vo.value|default=''}" lay-verify="required" autocomplete="off" placeholder="请输入{$vo.title}" class="layui-input" type="text">
						</div>
						{elseif $vo.type eq 'number'}
						<!-- 数字文本 -->
						<div class="layui-input-inline">
							<input name="{$vo.name}" value="{$vo.value|default=''}" lay-verify="required|number" autocomplete="off" placeholder="请输入{$vo.title}" class="layui-input" type="text">
						</div>
						{elseif $vo.type eq 'textarea'}
						<!-- 多行文本 -->
						<div class="layui-input-inline">
							<textarea name="{$vo.name}" placeholder="请输入{$vo.title}" class="layui-textarea">{$vo.value|default=''}</textarea>
						</div>
						{elseif $vo.type eq 'password'}
						<div class="layui-input-inline">
							<!-- 密码 -->
							<input name="{$vo.name}" value="{$vo.value|default=''}" placeholder="请输入{$vo.title}" autocomplete="off" class="layui-input" type="password">
						</div>
						{elseif $vo.type eq 'radio'}
						<!-- 单选框 -->
						<div class="layui-input-inline">
							{:widget('common/radioCheck',array($vo['format_name'],isset($vo['format_options']) ? $vo['format_options'] : [], isset($vo['value']) ? $vo['value'] : 0))}
						</div>
						{elseif $vo.type eq 'checkbox'}
						<!-- 复选框 -->
						<div class="layui-input-block">
							{:widget('checkbox/simpleSelect',array($vo['format_name'],isset($vo['format_options']) ? $vo['format_options'] : [], isset($vo['format_value']) ? $vo['format_value'] : []))}
						</div>
						{elseif $vo.type eq 'select'}
						<!-- 下拉框 -->
						<div class="layui-input-inline">
							{:widget('common/singleSelect',array($vo['format_name'],isset($vo['format_options']) ? $vo['format_options'] : [],isset($vo['value']) ? $vo['value'] : 0))}
						</div>
						{elseif $vo.type eq 'date'}
						<!-- 日期 -->
						<div class="layui-input-inline">
							<input name="{$vo.name}" id="date_select" value="{$vo.value|default=''}" lay-verify="date" placeholder="请选择{$vo.title}" autocomplete="off" class="layui-input date-icon" type="text">
						</div>
						{elseif $vo.type eq 'datetime'}
						<!-- 时间 -->
						<div class="layui-input-inline">
							<input name="{$vo.name}" id="datetime_select" value="{$vo.value|default=''}" lay-verify="datetime" placeholder="请选择{$vo.title}" autocomplete="off" class="layui-input date-icon" type="text">
						</div>
						{elseif $vo.type eq 'image'}
						<!-- 单图 -->
						{:widget('upload/uploadSingleImage',array($vo['name'] . '__upimage',isset($vo['image_url']) ? $vo['image_url'] : '' ,'90x90'))}
						{elseif $vo.type eq 'images'}
						<!-- 多图 -->
						<div class="layui-input-block">
							{:widget('upload/uploadMultipleImage',array($vo['name'] . '__upimgs',isset($vo['imgs_list']) ? $vo['imgs_list'] : [],'图集','100x100',20))}
						</div>
						{elseif $vo.type eq 'file'}
						<!-- 单文件上传 -->
						{elseif $vo.type eq 'files'}
						<!-- 多文件上传 -->
						{elseif $vo.type eq 'ueditor'}
						<!-- 富文本编辑器 -->
						<div class="layui-input-block" style="width:800px;">
							<textarea name="{$vo.name}__ueditor" lay-verify="required" class="layui-textarea">{$vo.value}</textarea>
							{:widget('editor/getKindeditor',array('default',$vo.name . '__ueditor','100%',450))}
						</div>
						{elseif $vo.type eq 'json'}
						<!-- JSON -->
						{/if}
					</div>
				{/if}
			{/foreach}
			{/if}
			{:widget('common/submitBtn',array('submit|立即保存', 1))}
		</form>
	</div>
</div>
{/block}